package com.epoint.juc.provider;

public class Demo {

    public static void main(String[] args) {
        Msg msg = new Msg();
        new Thread(()->{
            try {
                msg.send();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }).start();
        new Thread(()->{
            try {
                msg.read();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }).start();
    }

}